import {GithubOutlined, WechatOutlined} from '@ant-design/icons';
import { DefaultFooter } from '@ant-design/pro-components';
import { useIntl } from '@umijs/max';
import React from 'react';
import {Tooltip} from "antd";


const Footer: React.FC = () => {
  const intl = useIntl();
  const defaultMessage = intl.formatMessage({
    id: 'app.copyright.produced',
    defaultMessage: '无须终有&近水楼台出品',
  });

  const currentYear = new Date().getFullYear();

  return (
    <DefaultFooter
      style={{
        background: 'none',
      }}
      copyright={`${currentYear} ${defaultMessage}`}
      links={[
        {
          key: 'github',
          title:(
            <Tooltip title="查看本站技术及源码">
              <GithubOutlined/> 支持项目
            </Tooltip>
          ) ,
          href: 'https://gitee.com/jiao-ruifang/open-api.git',
          blankTarget: true,
        },
        {
          key: 'wx联系作者',
          title: (
            <Tooltip title="😀X2089661746,lby15236516719👈">
              <WechatOutlined/> 微信联系作者
            </Tooltip>
          ),
          href: '#',
          blankTarget: false,
        },
        {
          key: 'qq联系作者',
          title: (
            <Tooltip title="😀2869360690,2089661746👈">
              <WechatOutlined/> QQ联系作者
            </Tooltip>
          ),
          href: '#',
          blankTarget: false,
        }
      ]}
      // links={[
      //   {
      //     key: 'Ant Design Pro',
      //     title: 'Ant Design Pro',
      //     href: 'https://pro.ant.design',
      //     blankTarget: true,
      //   },
      //   {
      //     key: 'github',
      //     title: <GithubOutlined />,
      //     href: 'https://github.com/ant-design/ant-design-pro',
      //     blankTarget: true,
      //   },
      //   {
      //     key: 'Ant Design',
      //     title: 'Ant Design',
      //     href: 'https://ant.design',
      //     blankTarget: true,
      //   },
      // ]}
    />
  );
};

export default Footer;
